import { lazy } from "react";
import {ROUTESTYPE,HOMEPATHTYPE} from "../types/router.d"
import { FriendsO, HomeO, CartO, SettingO } from '@react-vant/icons';
export const homePath:HOMEPATHTYPE[]=[
    {
        path:"/home/index",
        component:lazy(()=>import("../views/home/index/Index")),
        title:"书包",
        icon:HomeO
    },
    {
        path:"/home/classify",
        component:lazy(()=>import("../views/home/classify/Classify")),
        title:"精选",
        icon:SettingO
    },

    {
        path:"/home/shopcar",
        component:lazy(()=>import("../views/home/shopcar/Shopcar")),
        title:"排行",
        icon:CartO
    },
    {
        path:"/home/my",
        component:lazy(()=>import("../views/home/my/My")),
        title:"分类",
        icon:FriendsO
    },

]
const routes:ROUTESTYPE[] =[
    {
        path:"/home",
        component:lazy(()=>import("../views/home/Home")),
        children:homePath
    },
    {
        path:"/login",
        component:lazy(()=>import("../views/login/Login")),
    },
    {
        path:"/detail/:id",
        component:lazy(()=>import("../views/detail/Detail")),
    },
    {
        path:"/",
        to:"/home/index"
    },

];
export default routes;